Bug 695895: Fix gtk3-demo on Windows
authorChun-wei Fan <fanchunwei@src.gnome.org>
Mon, 18 Mar 2013 01:16:13 +0000 (09:16 +0800)
committerChun-wei Fan <fanchunwei@src.gnome.org>
Tue, 26 Mar 2013 08:59:16 +0000 (16:59 +0800)
commitb1aa23f4bd5397d2c12f80aed31853c49e8e283b
tree613be7513fa8f45e720beff6332b9d626b1496e6
parentbe2c1ac316e0f4f1edf5757dcfd2985859f98e7a
Bug 695895: Fix gtk3-demo on Windows

In commit 4e41577b, we are using g_content_type_is_a() to determine how
to display the demo resources in the right pane of the gtk3-demo program.

Use g_content_type_get_mime_type(), so that we can obtain the mime
type of the demo resources on all platforms, as g_content_type_guess()
returns a platform-specific string, as
https://developer.gnome.org/gio/2.35/gio-GContentType.html states.

As .ui files and .css files are normally registered with a different mime
type string on Windows, check for those strings as well.

This will ensure the demo resources can be properly displayed on Windows
as well.
demos/gtk-demo/main.c